﻿using System.Diagnostics;

namespace DimensionsHelper.LanguageService.Syntax;

public class MetadataInitialAnswer : MetadataSingleArgumentSuffix<Expression>
{
    internal MetadataInitialAnswer(SyntaxToken initialAnswerKeywortToken, SyntaxNode? parent) :
        base(SyntaxKinds.MetadataInitialAnswer,
            initialAnswerKeywortToken,
            NodeConverter.ToIdentifier(initialAnswerKeywortToken),
            parent)
    {
    }
}


public static partial class NodeFactory
{
    public static MetadataInitialAnswer CreateMetadataInitialAnswer(SyntaxNode? parent,
        SyntaxToken initialAnswerKeywordToken, Expression? value)
    {
        Debug.Assert(initialAnswerKeywordToken.IsNode(SyntaxKinds.InitialAnswerKeywordToken));
        MetadataInitialAnswer initialAnswer = new(initialAnswerKeywordToken, parent);
        return UpdateMetadataSingleArgumentSuffix(initialAnswer, value);
    }
}